package com.wang.ymcc.service.impl;

import com.wang.ymcc.domain.UserBaseInfo;
import com.wang.ymcc.mapper.UserBaseInfoMapper;
import com.wang.ymcc.service.IUserBaseInfoService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * <p>
 * 会员基本信息 服务实现类
 * </p>
 *
 * @author whale
 * @since 2022-10-19
 */
@Service
public class UserBaseInfoServiceImpl extends ServiceImpl<UserBaseInfoMapper, UserBaseInfo> implements IUserBaseInfoService {
    @Override
    public void save(Long userId, int regChannel) {
        UserBaseInfo info = new UserBaseInfo();
        info.setCreateTime(new Date().getTime());
        info.setId(userId);
        info.setRegChannel(regChannel);
        info.setLevel(0);
        info.setGrowScore(0);
        insert(info);
    }
}
